package com.cskaoyan.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

/**
 * @author stone
 * @date 2022/12/23 15:49
 */
@Configuration
public class MvcConfiguration {
    // 组件id一定要是multipartResolver
    @Bean("multipartResolver")
    public CommonsMultipartResolver multipartResolver() {
        CommonsMultipartResolver commonsMultipartResolver = new CommonsMultipartResolver();
        // commonsMultipartResolver.set 可以使用其set方法做一些设置
        return commonsMultipartResolver;
    }
}
